package com.lxw.learning.controller;

import com.lxw.api.learning.LearningControllerApi;
import com.lxw.framework.domain.learning.response.GetMediaResult;
import com.lxw.learning.service.CourseLearningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/learning/course")
public class CourseLearningController implements LearningControllerApi {

    @Autowired
    private CourseLearningService courseLearningService;
    @Override
    @GetMapping("/getmedia/{courseId}/{teachplanId}")
    public GetMediaResult getmedia(@PathVariable("courseId") String courseId,
                                   @PathVariable("teachplanId")String teachplanId) {

        return courseLearningService.getmedia(courseId,teachplanId);
    }
}
